package com.cloudweb.oa.controller;

import cn.js.fan.db.ResultIterator;
import cn.js.fan.db.ResultRecord;
import cn.js.fan.util.StrUtil;
import com.cloudweb.oa.utils.ConstUtil;
import com.cloudwebsoft.framework.db.JdbcTemplate;
import com.cloudwebsoft.framework.util.LogUtil;
import com.redmoon.oa.android.Privilege;
import com.redmoon.oa.android.system.MobileAppIconConfigMgr;
import com.redmoon.oa.dept.DeptDb;
import com.redmoon.oa.dept.DeptUserDb;
import lombok.extern.slf4j.Slf4j;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Iterator;
import java.util.Vector;

@Slf4j
@RestController
@RequestMapping("/public/app")
public class AppController {

    @Autowired
    HttpServletRequest request;

    /*@ResponseBody
    @RequestMapping(value = "/getAppIcons", produces = {"application/json;charset=UTF-8;"})
    public String getAppIcons() {
        JSONObject jReturn = new JSONObject();
        JSONObject jResult = new JSONObject();

        MobileAppIconConfigMgr appMgr = new MobileAppIconConfigMgr();
        JSONArray arr = appMgr.getAppIcons(request);

        if (arr.length() == 0) {
            jReturn.put("res", ConstUtil.RES_SUCCESS);
            jResult.put("returnCode", ConstUtil.RETURNCODE_SUCCESS_NULL);
            jReturn.put("result", jResult);
            return jReturn.toString();
        }

        jReturn.put("res", ConstUtil.RES_SUCCESS);
        jResult.put("returnCode", ConstUtil.RETURNCODE_SUCCESS);
        jResult.put("datas", arr);
        jReturn.put("result", jResult);
        return jReturn.toString();
    }*/
}
